package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IEditPersonMessageModel;
import com.wgts.wgts.mvp.model.imp.EditPersonMessageModel;
import com.wgts.wgts.mvp.model.imp.SendSMSCodeModel;
import com.wgts.wgts.mvp.presenter.ISettingPasswordActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.SettingPasswordActivityPresenter;
import com.wgts.wgts.mvp.view.ISettingPasswordActivityView;
import com.wgts.wgts.netmodle.NetService;
import com.wgts.wgts.tools.CountDownTime;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/69:03
 *
 */
@Module
public class SettingPasswordActivityModule {
    private ISettingPasswordActivityView view;

    public SettingPasswordActivityModule(ISettingPasswordActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public ISettingPasswordActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IEditPersonMessageModel provideModel(NetService netService){
        return new EditPersonMessageModel(netService);
    }

    @ActivityScope
    @Provides
    public SendSMSCodeModel provideSmsModel(NetService netService, CountDownTime countDownTime){
        return new SendSMSCodeModel(netService, countDownTime);
    }

    @ActivityScope
    @Provides
    public ISettingPasswordActivityPresenter providePresenter(ISettingPasswordActivityView view, IEditPersonMessageModel model, SendSMSCodeModel smsCodeModel){
        return new SettingPasswordActivityPresenter(view, model, smsCodeModel);
    }
}
